package com.travel.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.travel.common.pojo.Scenic;
import com.travel.service.HtmlService;

@Controller
@RequestMapping("/htmlcon")
public class HtmlController {
	@Autowired
	private HtmlService hService;
	@RequestMapping("/sceniclist")
	public String Sceniclist(ModelMap map) {
		List<Map<String,Object>>  slist=hService.getSlist();
		map.addAttribute("slist", slist);
		return "sceniclist";
	}
	
	@RequestMapping("/closejinqu")
	@ResponseBody
	public Boolean closejinqu(int id) {
		System.out.println(id);
		int i=hService.closejinqu(id);
		System.out.println(i);
		if(i>0) {
			return true;
		}else {
			return false;
		}
	}
	
	@RequestMapping("/updjinqu")
	public String updym(int id) {
	/*	Scenic scenic=hService.getJinqu(id);
		map.put("scenic", scenic);*/
		return "updscenic";
	}
}
